import request from '@/utils/request'

export function listtsCabinet(query) {
  return request({
    url: '/material/tsCabinet/list',
    method: 'get',
    params: query
  })
}

export function createtsCabinet(data) {
  return request({
    url: '/material/tsCabinet/create',
    method: 'post',
    data
  })
}

export function readtsCabinet(data) {
  return request({
    url: '/material/tsCabinet/get/' + data.id,
    method: 'get'
  })
}

export function updatetsCabinet(data) {
  return request({
    url: '/material/tsCabinet/update',
    method: 'post',
    data
  })
}

export function deletetsCabinet(data) {
  let formatObj = data.fequipmentbarcode.replace(/\#/g,"%23")
  return request({
    url: '/material/tsCabinet/delete/' + formatObj,
    method: 'delete'
  })
}

export function listMaterial(query) {
  return request({
    url: '/phone/getRepertorySort',
    method: 'get',
    params: query
  })
}
